package org.itboys.mobile.dto.order;

import org.itboys.mobile.dto.common.MobileBaseDto;
import org.itboys.mongodb.entity.BaseMySqlEntity;

import java.math.BigDecimal;

/**
 * 作者：jiangxiong
 * 日期：2016年11月25日
 * 联系方式 ：empty90911@126.com
 * 描述：农厨_订单_商品_实体
 */
public class SundayOrderProductDto extends MobileBaseDto{
        private String name;//产品名称
        private String image;//产品主图
        private Integer num;//数量
        private String standard;//规格
        private BigDecimal price;//零售价
        private Integer type;//类型 1普通，2新品，3特卖，4海淘，5金领，6爱购币，7积分(废弃)，8秒杀，9拼团，10试用
        public SundayOrderProductDto() {
        }
        public SundayOrderProductDto(long id, String createTime, String createDate, String name, String image, Integer num, String standard, BigDecimal price, Integer type) {
                super(id, createTime, createDate);
                this.name = name;
                this.image = image;
                this.num = num;
                this.standard = standard;
                this.price = price;
                this.type = type;
        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        public String getImage() {
                return image;
        }

        public void setImage(String image) {
                this.image = image;
        }

        public Integer getNum() {
                return num;
        }

        public void setNum(Integer num) {
                this.num = num;
        }

        public String getStandard() {
                return standard;
        }

        public void setStandard(String standard) {
                this.standard = standard;
        }

        public BigDecimal getPrice() {
                return price;
        }

        public void setPrice(BigDecimal price) {
                this.price = price;
        }

        public Integer getType() {
                return type;
        }

        public void setType(Integer type) {
                this.type = type;
        }

        public String getTypeStr(){
                String typeStr= "";
                if(type==null)return typeStr;

                switch (type) {
                        case 1:
                                typeStr="普通";
                                break;
                        case 2:
                                typeStr="新品";
                                break;
                        case 3:
                                typeStr="特卖";
                                break;
                        case 4:
                                typeStr="海淘";
                                break;
                        case 5:
                                typeStr="分销";
                                break;
                        case 6:
                                typeStr="爱购币";
                                break;
                        case 7:
                                typeStr="积分";
                                break;
                        case 8:
                                typeStr="秒杀";
                                break;
                        case 9:
                                typeStr="拼团";
                                break;
                        case 10:
                                typeStr="试用";
                                break;
                        default:
                                break;
                }
                return typeStr;
        }

        /**
         * 获取不同类别的样式
         * @return
         */
        public String getTypeClass(){
                String typeClass= "";
                if(type==null)return typeClass;

                switch (type) {
                        case 1:
                                typeClass="common";
                                break;
                        case 2:
                                typeClass="usually";
                                break;
                        case 3:
                                typeClass="usually";
                                break;
                        case 4:
                                typeClass="sea";
                                break;
                        case 5:
                                typeClass="gold";
                                break;
                        case 6:
                                typeClass="usually";
                                break;
                        case 7:
                                typeClass="";
                                break;
                        case 8:
                                typeClass="usually";
                                break;
                        case 9:
                                typeClass="team";
                                break;
                        case 10:
                                typeClass="try-score";
                                break;
                        default:
                                break;
                }
                return typeClass;
        }
}
